import request from '@/utils/request'

// 查询短视频列表
export function listShort(query) {
  return request({
    url: '/cms/short/list',
    method: 'get',
    params: query
  })
}

// 查询短视频详细
export function getShort(shortId) {
  return request({
    url: '/cms/short/' + shortId,
    method: 'get'
  })
}

// 新增短视频
export function addShort(data) {
  return request({
    url: '/cms/short',
    method: 'post',
    data: data
  })
}

// 修改短视频
export function updateShort(data) {
  return request({
    url: '/cms/short',
    method: 'put',
    data: data
  })
}

// 删除短视频
export function delShort(shortId) {
  return request({
    url: '/cms/short/' + shortId,
    method: 'delete'
  })
}

// 导出短视频
export function exportShort(query) {
  return request({
    url: '/cms/short/export',
    method: 'get',
    params: query
  })
}

// 审核短视频
export function auditShort(shortId, status, remark) {
  const data = {
    shortId,
    status,
    remark
  }
  return request({
    url: '/cms/short/audit',
    method: 'put',
    data: data
  })
}